/**
 * Created by zhaojing on 2017/11/15.
 */

import Vue from 'vue';
import tpl from './tpl.html';
import FdSwipe from '../../../../grsc-base/component/Slide/vue-slide.vue'
import commonService from '../../../common/commonService';
import lib from '../../../common/lib';

export default Vue.extend({
    name: 'Swiper',
    template: tpl,
    components: {
        rdSwipe: FdSwipe
    },

    data() {
        return {
            lib: lib,
            hasLogin: false,
            swipe: {
                activeIndex: 0,
                autoplay: 5000
            },
            contacts: [{
                text: 'Page 1'
            }, {
                text: 'Page 2'
            }, {
                text: 'Page 3'
            }, {
                text: 'Page 4'
            }]
        }
    },
    created() {
        commonService.basic().done((rep) => {
            if (rep.code === '100200') {
                this.hasLogin = true;
            }
            console.log(this.hasLogin)
        }).fail((rep) => {
            window.error(rep.msg);
        }).always(rep => {

        });
    },
    mounted() {

    },
    methods: {

        turnToRegister() {
            window.location.href = "./register.html";
        },

        goFinance() {
            window.location.href = "./smc_finance.html";
        },

        goVca() {
            window.location.href = './vca_usc.html'
        }

    },
    watch: {

    }
});